Skip to content

feat: add course versioning, credential display properties, and metadata update (#246, #245, #244, #243) - #376

Merged
DeFiVC merged 7 commits into
ChainLearnOfficial:mainfrom
Sweet-Kid:feature/issues-246-245-244-243
Aug 30, 2026
Merged

feat: add course versioning, credential display properties, and metadata update (#246, #245, #244, #243)#376
DeFiVC merged 7 commits into
ChainLearnOfficial:mainfrom
Sweet-Kid:feature/issues-246-245-244-243

Conversation

@Sweet-Kid

Copy link
Copy Markdown
Contributor

Summary

This PR implements four feature enhancements to the ChainLearn smart contracts:

  • closes . Add course prerequisites #246 - Course Prerequisites
    Already implemented in codebase. Verified that prerequisites field exists in Course struct with enrollment checks and queryability via set_prerequisites and get_prerequisites functions.
    closes . Add course versioning #245 - Course Versioning
  • Added version: u32 field to Course struct in progress-tracker/src/types.rs
  • Added completed_version: Option field to ProgressInfo and ProgressExport structs to track which version each learner completed
  • Added update_course_version(course_id, new_version) admin function
  • Tracks course version when learner becomes eligible for credential
    closes . Add credential display properties #244 - Credential Display Properties
  • Added CredentialDisplay struct with optional image_url, description, and issuer_name fields
  • Added CredentialVerification struct that combines CredentialInfo with optional CredentialDisplay
  • Added Display(u64) variant to CredentialDataKey enum for storage
  • Added set_credential_display and get_credential_display functions
  • Added verify_credential_with_display function that returns both credential info and display properties
    closes . Add credential metadata update #243 - Credential Metadata Update
  • Added update_credential_metadata(credential_id, new_metadata_uri) admin function
  • Validates new URI using the same validation rules as minting
  • Emits credential_metadata_updated event
  • Ensures credential exists before allowing update
    All changes are backward compatible, include proper admin authorization checks, and follow existing patterns in the codebase.

@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@Sweet-Kid Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

. Add course prerequisites . Add course versioning . Add credential display properties . Add credential metadata update

2 participants